<template>
	<view class="v-search-container" @click="jumpserp">
		<view class="v-search-box">
			<uni-icons type="search" size="17"></uni-icons>
			<text class="placeholder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"v-search",
		data() {
			return {
				
			};
		},
		methods:{
			// click事件的回调,触发自定义事件实现跳转搜索页面
			jumpserp(){
				// 触发这个自定义事件
				// console.log("jumpserp事件出发了");
				this.$emit("jumpsearchpage")
			}
		}
	}
</script>

<style lang="scss">
.v-search-container{
	height: 50px;
	background-color: #ffaf47;
	.v-search-box{
		height: 36px;
		width: 325px;
		background-color: white;
		border-radius: 18px;
		margin: 0 auto;
		text-align: center;
		line-height: 36px;
		font-size: 16px;
		.placeholder{
			margin: 3px;
		}
	}
}
</style>